home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / bottom9.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  17KB  |  487 lines

  1. /***************************************************************************
  2.  
  3. Bottom of the Ninth (c) 1989 Konami
  4.  
  5. Similar to S.P.Y.
  6.  
  7. driver by Nicola Salmoria
  8.  
  9. ***************************************************************************/
  10.  
  11. #include "driver.h"
  12. #include "vidhrdw/generic.h"
  13. #include "cpu/m6809/m6809.h"
  14. #include "vidhrdw/konamiic.h"
  15.  
  16.  
  17. extern int bottom9_video_enable;
  18.  
  19. int bottom9_vh_start(void);
  20. void bottom9_vh_stop(void);
  21. void bottom9_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  22.  
  23.  
  24.  
  25. static int bottom9_interrupt(void)
  26. {
  27.     if (K052109_is_IRQ_enabled()) return interrupt();
  28.     else return ignore_interrupt();
  29. }
  30.  
  31.  
  32. static int zoomreadroms,K052109_selected;
  33.  
  34. static READ_HANDLER( bottom9_bankedram1_r )
  35. {
  36.     if (K052109_selected)
  37.         return K052109_051960_r(offset);
  38.     else
  39.     {
  40.         if (zoomreadroms)
  41.             return K051316_rom_0_r(offset);
  42.         else
  43.             return K051316_0_r(offset);
  44.     }
  45. }
  46.  
  47. static WRITE_HANDLER( bottom9_bankedram1_w )
  48. {
  49.     if (K052109_selected) K052109_051960_w(offset,data);
  50.     else K051316_0_w(offset,data);
  51. }
  52.  
  53. static READ_HANDLER( bottom9_bankedram2_r )
  54. {
  55.     if (K052109_selected) return K052109_051960_r(offset + 0x2000);
  56.     else return paletteram_r(offset);
  57. }
  58.  
  59. static WRITE_HANDLER( bottom9_bankedram2_w )
  60. {
  61.     if (K052109_selected) K052109_051960_w(offset + 0x2000,data);
  62.     else paletteram_xBBBBBGGGGGRRRRR_swap_w(offset,data);
  63. }
  64.  
  65. static WRITE_HANDLER( bankswitch_w )
  66. {
  67.     unsigned char *RAM = memory_region(REGION_CPU1);
  68.     int offs;
  69.  
  70.     /* bit 0 = RAM bank */
  71. if ((data & 1) == 0) usrintf_showmessage("bankswitch RAM bank 0");
  72.  
  73.     /* bit 1-4 = ROM bank */
  74.     if (data & 0x10) offs = 0x20000 + (data & 0x06) * 0x1000;
  75.     else offs = 0x10000 + (data & 0x0e) * 0x1000;
  76.     cpu_setbank(1,&RAM[offs]);
  77. }
  78.  
  79. static WRITE_HANDLER( bottom9_1f90_w )
  80. {
  81.     /* bits 0/1 = coin counters */
  82.     coin_counter_w(0,data & 0x01);
  83.     coin_counter_w(1,data & 0x02);
  84.  
  85.     /* bit 2 = enable char ROM reading through the video RAM */
  86.     K052109_set_RMRD_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
  87.  
  88.     /* bit 3 = disable video */
  89.     bottom9_video_enable = ~data & 0x08;
  90.  
  91.     /* bit 4 = enable 051316 ROM reading */
  92.     zoomreadroms = data & 0x10;
  93.  
  94.     /* bit 5 = RAM bank */
  95.     K052109_selected = data & 0x20;
  96. }
  97.  
  98. static WRITE_HANDLER( bottom9_sh_irqtrigger_w )
  99. {
  100.     cpu_cause_interrupt(1,0xff);
  101. }
  102.  
  103. static int nmienable;
  104.  
  105. static int bottom9_sound_interrupt(void)
  106. {
  107.     if (nmienable) return nmi_interrupt();
  108.     else return ignore_interrupt();
  109. }
  110.  
  111. static WRITE_HANDLER( nmi_enable_w )
  112. {
  113.     nmienable = data;
  114. }
  115.  
  116. static WRITE_HANDLER( sound_bank_w )
  117. {
  118.     unsigned char *RAM;
  119.     int bank_A,bank_B;
  120.  
  121.     RAM = memory_region(REGION_SOUND1);
  122.     bank_A = 0x20000 * ((data >> 0) & 0x03);
  123.     bank_B = 0x20000 * ((data >> 2) & 0x03);
  124.     K007232_bankswitch(0,RAM + bank_A,RAM + bank_B);
  125.     RAM = memory_region(REGION_SOUND2);
  126.     bank_A = 0x20000 * ((data >> 4) & 0x03);
  127.     bank_B = 0x20000 * ((data >> 6) & 0x03);
  128.     K007232_bankswitch(1,RAM + bank_A,RAM + bank_B);
  129. }
  130.  
  131.  
  132.  
  133. static struct MemoryReadAddress bottom9_readmem[] =
  134. {
  135.     { 0x0000, 0x07ff, bottom9_bankedram1_r },
  136.     { 0x1fd0, 0x1fd0, input_port_4_r },
  137.     { 0x1fd1, 0x1fd1, input_port_0_r },
  138.     { 0x1fd2, 0x1fd2, input_port_1_r },
  139.     { 0x1fd3, 0x1fd3, input_port_2_r },
  140.     { 0x1fe0, 0x1fe0, input_port_3_r },
  141.     { 0x2000, 0x27ff, bottom9_bankedram2_r },
  142.     { 0x0000, 0x3fff, K052109_051960_r },
  143.     { 0x4000, 0x5fff, MRA_RAM },
  144.     { 0x6000, 0x7fff, MRA_BANK1 },
  145.     { 0x8000, 0xffff, MRA_ROM },
  146.     { -1 }    /* end of table */
  147. };
  148.  
  149. static struct MemoryWriteAddress bottom9_writemem[] =
  150. {
  151.     { 0x0000, 0x07ff, bottom9_bankedram1_w },
  152.     { 0x1f80, 0x1f80, bankswitch_w },
  153.     { 0x1f90, 0x1f90, bottom9_1f90_w },
  154.     { 0x1fa0, 0x1fa0, watchdog_reset_w },
  155.     { 0x1fb0, 0x1fb0, soundlatch_w },
  156.     { 0x1fc0, 0x1fc0, bottom9_sh_irqtrigger_w },
  157.     { 0x1ff0, 0x1fff, K051316_ctrl_0_w },
  158.     { 0x2000, 0x27ff, bottom9_bankedram2_w, &paletteram },
  159.     { 0x0000, 0x3fff, K052109_051960_w },
  160.     { 0x4000, 0x5fff, MWA_RAM },
  161.     { 0x6000, 0x7fff, MWA_ROM },
  162.     { 0x8000, 0xffff, MWA_ROM },
  163.     { -1 }    /* end of table */
  164. };
  165.  
  166. static struct MemoryReadAddress bottom9_sound_readmem[] =
  167. {
  168.     { 0x0000, 0x7fff, MRA_ROM },
  169.     { 0x8000, 0x87ff, MRA_RAM },
  170.     { 0xa000, 0xa00d, K007232_read_port_0_r },
  171.     { 0xb000, 0xb00d, K007232_read_port_1_r },
  172.     { 0xd000, 0xd000, soundlatch_r },
  173.     { -1 }    /* end of table */
  174. };
  175.  
  176. static struct MemoryWriteAddress bottom9_sound_writemem[] =
  177. {
  178.     { 0x0000, 0x7fff, MWA_ROM },
  179.     { 0x8000, 0x87ff, MWA_RAM },
  180.     { 0x9000, 0x9000, sound_bank_w },
  181.     { 0xa000, 0xa00d, K007232_write_port_0_w },
  182.     { 0xb000, 0xb00d, K007232_write_port_1_w },
  183.     { 0xf000, 0xf000, nmi_enable_w },
  184.     { -1 }    /* end of table */
  185. };
  186.  
  187.  
  188.  
  189. INPUT_PORTS_START( bottom9 )
  190.     PORT_START
  191.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  192.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  193.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  194.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  195.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  196.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  197.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  198.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  199.  
  200.     PORT_START
  201.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
  202.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  203.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  204.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  205.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  206.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  207.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  208.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  209.  
  210.     PORT_START
  211.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  212.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  213.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  214.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  215.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  216.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  217.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  218.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )
  219.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  220.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  221.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  222.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  223.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  224.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  225.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  226.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  227.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  228.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  229.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  230.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  231.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  232.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  233.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  234.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  235.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )
  236.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  237.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  238.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  239.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  240.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  241.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  242.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  243.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  244.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  245.  
  246.     PORT_START
  247.     PORT_DIPNAME( 0x07, 0x04, "Play Time" )
  248.     PORT_DIPSETTING(    0x07, "1'00" )
  249.     PORT_DIPSETTING(    0x06, "1'10" )
  250.     PORT_DIPSETTING(    0x05, "1'20" )
  251.     PORT_DIPSETTING(    0x04, "1'30" )
  252.     PORT_DIPSETTING(    0x03, "1'40" )
  253.     PORT_DIPSETTING(    0x02, "1'50" )
  254.     PORT_DIPSETTING(    0x01, "2'00" )
  255.     PORT_DIPSETTING(    0x00, "2'10" )
  256.     PORT_DIPNAME( 0x18, 0x08, "Bonus Time" )
  257.     PORT_DIPSETTING(    0x18, "00" )
  258.     PORT_DIPSETTING(    0x10, "20" )
  259.     PORT_DIPSETTING(    0x08, "30" )
  260.     PORT_DIPSETTING(    0x00, "40" )
  261.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  262.     PORT_DIPSETTING(    0x60, "Easy" )
  263.     PORT_DIPSETTING(    0x40, "Normal" )
  264.     PORT_DIPSETTING(    0x20, "Difficult" )
  265.     PORT_DIPSETTING(    0x00, "Very Difficult" )
  266.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  267.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  268.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  269.  
  270.     PORT_START
  271.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  272.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  273.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  274.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  275.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
  276.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  277.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  278.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  279.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  280.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  281.     PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
  282.     PORT_DIPNAME( 0x80, 0x80, "Fielder Control" )
  283.     PORT_DIPSETTING(    0x80, "Normal" )
  284.     PORT_DIPSETTING(    0x00, "Auto" )
  285. INPUT_PORTS_END
  286.  
  287.  
  288.  
  289. static void volume_callback0(int v)
  290. {
  291.     K007232_set_volume(0,0,(v >> 4) * 0x11,0);
  292.     K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
  293. }
  294.  
  295. static void volume_callback1(int v)
  296. {
  297.     K007232_set_volume(1,0,(v >> 4) * 0x11,0);
  298.     K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
  299. }
  300.  
  301. static struct K007232_interface k007232_interface =
  302. {
  303.     2,            /* number of chips */
  304.     { REGION_SOUND1, REGION_SOUND2 },    /* memory regions */
  305.     { K007232_VOL(40,MIXER_PAN_CENTER,40,MIXER_PAN_CENTER),
  306.             K007232_VOL(40,MIXER_PAN_CENTER,40,MIXER_PAN_CENTER) },    /* volume */
  307.     { volume_callback0, volume_callback1 }    /* external port callback */
  308. };
  309.  
  310.  
  311.  
  312. static struct MachineDriver machine_driver_bottom9 =
  313. {
  314.     {
  315.         {
  316.             CPU_M6809,
  317.             2000000, /* ? */
  318.             bottom9_readmem,bottom9_writemem,0,0,
  319.             bottom9_interrupt,1
  320.         },
  321.         {
  322.             CPU_Z80 | CPU_AUDIO_CPU,
  323.             3579545,
  324.             bottom9_sound_readmem, bottom9_sound_writemem,0,0,
  325.             bottom9_sound_interrupt,8    /* irq is triggered by the main CPU */
  326.         }
  327.     },
  328.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  329.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  330.     0,
  331.  
  332.     /* video hardware */
  333.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  334.     0,    /* gfx decoded by konamiic.c */
  335.     1024, 1024,
  336.     0,
  337.  
  338.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  339.     0,
  340.     bottom9_vh_start,
  341.     bottom9_vh_stop,
  342.     bottom9_vh_screenrefresh,
  343.  
  344.     /* sound hardware */
  345.     0,0,0,0,
  346.     {
  347.         {
  348.             SOUND_K007232,
  349.             &k007232_interface
  350.         }
  351.     }
  352. };
  353.  
  354.  
  355. /***************************************************************************
  356.  
  357.   Game ROMs
  358.  
  359. ***************************************************************************/
  360.  
  361. ROM_START( bottom9 )
  362.     ROM_REGION( 0x28000, REGION_CPU1 ) /* code + banked roms */
  363.     ROM_LOAD( "891n03.k17",   0x10000, 0x10000, 0x8b083ff3 )
  364.     ROM_LOAD( "891-t02.k15",  0x20000, 0x08000, 0x2c10ced2 )
  365.     ROM_CONTINUE(             0x08000, 0x08000 )
  366.  
  367.     ROM_REGION( 0x10000, REGION_CPU2 ) /* Z80 code */
  368.     ROM_LOAD( "891j01.g8",    0x0000, 0x8000, 0x31b0a0a8 )
  369.  
  370.     ROM_REGION( 0x080000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */
  371.     ROM_LOAD_GFX_EVEN( "891e10c", 0x00000, 0x10000, 0x209b0431 )    /* characters */
  372.     ROM_LOAD_GFX_ODD ( "891e10a", 0x00000, 0x10000, 0x8020a9e8 )
  373.     ROM_LOAD_GFX_EVEN( "891e10d", 0x20000, 0x10000, 0x16d5fd7a )
  374.     ROM_LOAD_GFX_ODD ( "891e10b", 0x20000, 0x10000, 0x30121cc0 )
  375.     ROM_LOAD_GFX_EVEN( "891e09c", 0x40000, 0x10000, 0x9dcaefbf )
  376.     ROM_LOAD_GFX_ODD ( "891e09a", 0x40000, 0x10000, 0x56b0ead9 )
  377.     ROM_LOAD_GFX_EVEN( "891e09d", 0x60000, 0x10000, 0x4e1335e6 )
  378.     ROM_LOAD_GFX_ODD ( "891e09b", 0x60000, 0x10000, 0xb6f914fb )
  379.  
  380.     ROM_REGION( 0x100000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */
  381.     ROM_LOAD_GFX_EVEN( "891e06e", 0x00000, 0x10000, 0x0b04db1c )    /* sprites */
  382.     ROM_LOAD_GFX_ODD ( "891e06a", 0x00000, 0x10000, 0x5ee37327 )
  383.     ROM_LOAD_GFX_EVEN( "891e06f", 0x20000, 0x10000, 0xf9ada524 )
  384.     ROM_LOAD_GFX_ODD ( "891e06b", 0x20000, 0x10000, 0x2295dfaa )
  385.     ROM_LOAD_GFX_EVEN( "891e06g", 0x40000, 0x10000, 0x04abf78f )
  386.     ROM_LOAD_GFX_ODD ( "891e06c", 0x40000, 0x10000, 0xdbdb0d55 )
  387.     ROM_LOAD_GFX_EVEN( "891e06h", 0x60000, 0x10000, 0x5d5ded8c )
  388.     ROM_LOAD_GFX_ODD ( "891e06d", 0x60000, 0x10000, 0xf9ecbd71 )
  389.     ROM_LOAD_GFX_EVEN( "891e05e", 0x80000, 0x10000, 0xb356e729 )
  390.     ROM_LOAD_GFX_ODD ( "891e05a", 0x80000, 0x10000, 0xbfd5487e )
  391.     ROM_LOAD_GFX_EVEN( "891e05f", 0xa0000, 0x10000, 0xecdd11c5 )
  392.     ROM_LOAD_GFX_ODD ( "891e05b", 0xa0000, 0x10000, 0xaba18d24 )
  393.     ROM_LOAD_GFX_EVEN( "891e05g", 0xc0000, 0x10000, 0xc315f9ae )
  394.     ROM_LOAD_GFX_ODD ( "891e05c", 0xc0000, 0x10000, 0x21fcbc6f )
  395.     ROM_LOAD_GFX_EVEN( "891e05h", 0xe0000, 0x10000, 0xb0aba53b )
  396.     ROM_LOAD_GFX_ODD ( "891e05d", 0xe0000, 0x10000, 0xf6d3f886 )
  397.  
  398.     ROM_REGION( 0x020000, REGION_GFX3 ) /* graphics ( dont dispose as the program can read them ) */
  399.     ROM_LOAD( "891e07a",      0x00000, 0x10000, 0xb8d8b939 )    /* zoom/rotate */
  400.     ROM_LOAD( "891e07b",      0x10000, 0x10000, 0x83b2f92d )
  401.  
  402.     ROM_REGION( 0x0200, REGION_PROMS )
  403.     ROM_LOAD( "891b11.f23",   0x0000, 0x0100, 0xecb854aa )    /* priority encoder (not used) */
  404.  
  405.     ROM_REGION( 0x40000, REGION_SOUND1 ) /* samples for 007232 #0 */
  406.     ROM_LOAD( "891e08a",      0x00000, 0x10000, 0xcef667bf )
  407.     ROM_LOAD( "891e08b",      0x10000, 0x10000, 0xf7c14a7a )
  408.     ROM_LOAD( "891e08c",      0x20000, 0x10000, 0x756b7f3c )
  409.     ROM_LOAD( "891e08d",      0x30000, 0x10000, 0xcd0d7305 )
  410.  
  411.     ROM_REGION( 0x40000, REGION_SOUND2 ) /* samples for 007232 #1 */
  412.     ROM_LOAD( "891e04a",      0x00000, 0x10000, 0xdaebbc74 )
  413.     ROM_LOAD( "891e04b",      0x10000, 0x10000, 0x5ffb9ad1 )
  414.     ROM_LOAD( "891e04c",      0x20000, 0x10000, 0x2dbbf16b )
  415.     ROM_LOAD( "891e04d",      0x30000, 0x10000, 0x8b0cd2cc )
  416. ROM_END
  417.  
  418. ROM_START( bottom9n )
  419.     ROM_REGION( 0x28000, REGION_CPU1 ) /* code + banked roms */
  420.     ROM_LOAD( "891n03.k17",   0x10000, 0x10000, 0x8b083ff3 )
  421.     ROM_LOAD( "891n02.k15",   0x20000, 0x08000, 0xd44d9ed4 )
  422.     ROM_CONTINUE(             0x08000, 0x08000 )
  423.  
  424.     ROM_REGION( 0x10000, REGION_CPU2 ) /* Z80 code */
  425.     ROM_LOAD( "891j01.g8",    0x0000, 0x8000, 0x31b0a0a8 )
  426.  
  427.     ROM_REGION( 0x080000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */
  428.     ROM_LOAD_GFX_EVEN( "891e10c", 0x00000, 0x10000, 0x209b0431 )    /* characters */
  429.     ROM_LOAD_GFX_ODD ( "891e10a", 0x00000, 0x10000, 0x8020a9e8 )
  430.     ROM_LOAD_GFX_EVEN( "891e10d", 0x20000, 0x10000, 0x16d5fd7a )
  431.     ROM_LOAD_GFX_ODD ( "891e10b", 0x20000, 0x10000, 0x30121cc0 )
  432.     ROM_LOAD_GFX_EVEN( "891e09c", 0x40000, 0x10000, 0x9dcaefbf )
  433.     ROM_LOAD_GFX_ODD ( "891e09a", 0x40000, 0x10000, 0x56b0ead9 )
  434.     ROM_LOAD_GFX_EVEN( "891e09d", 0x60000, 0x10000, 0x4e1335e6 )
  435.     ROM_LOAD_GFX_ODD ( "891e09b", 0x60000, 0x10000, 0xb6f914fb )
  436.  
  437.     ROM_REGION( 0x100000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */
  438.     ROM_LOAD_GFX_EVEN( "891e06e", 0x00000, 0x10000, 0x0b04db1c )    /* sprites */
  439.     ROM_LOAD_GFX_ODD ( "891e06a", 0x00000, 0x10000, 0x5ee37327 )
  440.     ROM_LOAD_GFX_EVEN( "891e06f", 0x20000, 0x10000, 0xf9ada524 )
  441.     ROM_LOAD_GFX_ODD ( "891e06b", 0x20000, 0x10000, 0x2295dfaa )
  442.     ROM_LOAD_GFX_EVEN( "891e06g", 0x40000, 0x10000, 0x04abf78f )
  443.     ROM_LOAD_GFX_ODD ( "891e06c", 0x40000, 0x10000, 0xdbdb0d55 )
  444.     ROM_LOAD_GFX_EVEN( "891e06h", 0x60000, 0x10000, 0x5d5ded8c )
  445.     ROM_LOAD_GFX_ODD ( "891e06d", 0x60000, 0x10000, 0xf9ecbd71 )
  446.     ROM_LOAD_GFX_EVEN( "891e05e", 0x80000, 0x10000, 0xb356e729 )
  447.     ROM_LOAD_GFX_ODD ( "891e05a", 0x80000, 0x10000, 0xbfd5487e )
  448.     ROM_LOAD_GFX_EVEN( "891e05f", 0xa0000, 0x10000, 0xecdd11c5 )
  449.     ROM_LOAD_GFX_ODD ( "891e05b", 0xa0000, 0x10000, 0xaba18d24 )
  450.     ROM_LOAD_GFX_EVEN( "891e05g", 0xc0000, 0x10000, 0xc315f9ae )
  451.     ROM_LOAD_GFX_ODD ( "891e05c", 0xc0000, 0x10000, 0x21fcbc6f )
  452.     ROM_LOAD_GFX_EVEN( "891e05h", 0xe0000, 0x10000, 0xb0aba53b )
  453.     ROM_LOAD_GFX_ODD ( "891e05d", 0xe0000, 0x10000, 0xf6d3f886 )
  454.  
  455.     ROM_REGION( 0x020000, REGION_GFX3 ) /* graphics ( dont dispose as the program can read them ) */
  456.     ROM_LOAD( "891e07a",      0x00000, 0x10000, 0xb8d8b939 )    /* zoom/rotate */
  457.     ROM_LOAD( "891e07b",      0x10000, 0x10000, 0x83b2f92d )
  458.  
  459.     ROM_REGION( 0x0200, REGION_PROMS )
  460.     ROM_LOAD( "891b11.f23",   0x0000, 0x0100, 0xecb854aa )    /* priority encoder (not used) */
  461.  
  462.     ROM_REGION( 0x40000, REGION_SOUND1 ) /* samples for 007232 #0 */
  463.     ROM_LOAD( "891e08a",      0x00000, 0x10000, 0xcef667bf )
  464.     ROM_LOAD( "891e08b",      0x10000, 0x10000, 0xf7c14a7a )
  465.     ROM_LOAD( "891e08c",      0x20000, 0x10000, 0x756b7f3c )
  466.     ROM_LOAD( "891e08d",      0x30000, 0x10000, 0xcd0d7305 )
  467.  
  468.     ROM_REGION( 0x40000, REGION_SOUND2 ) /* samples for 007232 #1 */
  469.     ROM_LOAD( "891e04a",      0x00000, 0x10000, 0xdaebbc74 )
  470.     ROM_LOAD( "891e04b",      0x10000, 0x10000, 0x5ffb9ad1 )
  471.     ROM_LOAD( "891e04c",      0x20000, 0x10000, 0x2dbbf16b )
  472.     ROM_LOAD( "891e04d",      0x30000, 0x10000, 0x8b0cd2cc )
  473. ROM_END
  474.  
  475.  
  476.  
  477. static void init_bottom9(void)
  478. {
  479.     konami_rom_deinterleave_2(REGION_GFX1);
  480.     konami_rom_deinterleave_2(REGION_GFX2);
  481. }
  482.  
  483.  
  484.  
  485. GAME( 1989, bottom9,  0,       bottom9, bottom9, bottom9, ROT0, "Konami", "Bottom of the Ninth (version T)" )
  486. GAME( 1989, bottom9n, bottom9, bottom9, bottom9, bottom9, ROT0, "Konami", "Bottom of the Ninth (version N)" )
  487.